<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php echo $this->Html->charset(); ?>
<title>
    <?php echo $backendPluginName; ?>
    <?php echo $title_for_layout; ?>
</title>
<?php
    echo $this->Html->meta('icon');

    echo $this->Html->css('/' . $backendPluginNameUnderscored . '-plugin/css/bootstrap.min.css');
    echo $this->Html->css('/' . $backendPluginNameUnderscored . '-plugin/css/simple-sidebar.css');
    echo $this->Html->css('/' . $backendPluginNameUnderscored . '-plugin/css/styles.css');
    echo $this->Html->css('/' . $backendPluginNameUnderscored . '-plugin/css/bootstrap-datetimepicker.min.css');
?>
    <!--[if lt IE 9]>
        <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
<?php    
    echo $this->Html->script('/' . $backendPluginNameUnderscored . '-plugin/js/vendors.min.js');
    echo $this->Html->script('/' . $backendPluginNameUnderscored . '-plugin/js/ckeditor/ckeditor.js');
    echo $this->Html->script('/' . $backendPluginNameUnderscored . '-plugin/js/ckfinder/ckfinder.js');
    
    echo $this->fetch('meta');
    echo $this->fetch('css');
    echo $this->fetch('script');
?>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
$(document).ready(function() {
    $('#datetimepicker').datetimepicker();
});
</script>
</head>

<body>
<div id="wrapper">
    <!-- top navbar--> 
    <div class="navbar navbar-default navbar-fixed-top" role="navigation">
        <div class="row" style="padding: 0 40px">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="offcanvas" data-target=".sidebar-nav">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
               <a class="navbar-brand" href="/admin"><?php echo $backendPluginName; ?></a>
            </div>
            <ul class="nav pull-right">
                <li><?php echo $this->Html->link('Logout', '/' . $backendPluginNameUnderscored . '/users/logout');?></li>
            </ul>
        </div>
    </div>
    <!-- //top navbar--> 
    <!-- Sidebar -->
    <?php echo $this->element('Layout/menu');?>
    <!-- /#sidebar-wrapper -->

    <!-- Page Content -->
    <div id="page-content-wrapper">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-12">
                    <a href="#menu-toggle" class="btn btn-default" id="menu-toggle">Toggle Menu</a>
                    <?php echo $this->fetch('content'); ?>
                </div>
            </div>
        </div>
    </div>
    <!-- /#page-content-wrapper -->

</div>
<!-- /#wrapper -->
<?php //echo $this->Html->script('https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js');?>
<?php echo $this->Html->script('/' . $backendPluginNameUnderscored . '-plugin/js/admin.min.js'); ?>
<?php echo $this->Html->script('/' . $backendPluginNameUnderscored . '-plugin/js/bootstrap.min.js'); ?>
<?php echo $this->Html->script('/' . $backendPluginNameUnderscored . '-plugin/js/scripts.js'); ?>
<?php echo $this->Html->script('/' . $backendPluginNameUnderscored . '-plugin/js/moment.js'); ?>
<?php echo $this->Html->script('/' . $backendPluginNameUnderscored . '-plugin/js/bootstrap-datetimepicker.js'); ?>

<!-- Menu Toggle Script -->
<script>
$("#menu-toggle").click(function(e) {
    e.preventDefault();
    $("#wrapper").toggleClass("toggled");
});
</script>
<?php echo $this->Js->writeBuffer(); ?>
<?php //echo $this->element('sql_dump'); ?>
</body>
</html>
